Component({
  data: {
    latitude: null,
    longitude: null,
  },
  created() {
    const that = this
    wx.getLocation({
      type: 'gcj02', //返回可以用于wx.openLocation的经纬度
      success(res) {
        // console.log(res)
        that.setData({
          latitude: res.latitude,
          longitude: res.longitude,
        })
      },
    })
  },
})
